package com.weiweiqin.service.impl;

import com.weiweiqin.dao.KjGoodsCustomerItemDao;
import com.weiweiqin.model.KjGoodsCustomerItem;
import com.weiweiqin.service.KjGoodsCustomerItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class KjGoodsCustomerItemServiceImpl implements KjGoodsCustomerItemService {
	@Autowired
	private KjGoodsCustomerItemDao kjGoodsCustomerItemDao;

	public KjGoodsCustomerItem getByGoodsIdAndCustomerId(int goodsId, int customerId) {
		return kjGoodsCustomerItemDao.getByGoodsIdAndCustomerId(goodsId,customerId);
	}

	public void save(KjGoodsCustomerItem kjGoodsCustomerItem) {
		kjGoodsCustomerItemDao.insert(kjGoodsCustomerItem);
	}

	public void update(KjGoodsCustomerItem kjGoodsCustomerItem) {
		kjGoodsCustomerItemDao.update(kjGoodsCustomerItem);
	}

	public void del(int id) {
		kjGoodsCustomerItemDao.delete(id);
	}

}